Potassium estimation algorithm